<template>
    <div>
        <div class="approval">
            <el-form label-width="80px">
                <el-form-item label="审批意见">
                    <el-input type="textarea" placeholder="请填写审批意见" v-model="approvalInfo" rows="4"></el-input>
                </el-form-item>
                <el-form-item>
                    <div style="float:right">
                        <el-button type="danger" size="small" @click="taskReject">驳回</el-button>
                        <el-button type="primary" size="small" @click="submitExamine">提交</el-button>
                    </div>
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>

<script>
export default {
  name: "approval",
  props:['submit', 'reject'],
  data () {
    return {
        approvalInfo:''
    };
  },
  methods:{
      submitExamine(){
          if(this.submit){
              this.submit(this.approvalInfo);
          }
      },
      taskReject(){
          if(this.reject){
              this.reject(this.approvalInfo);
          }
      },
  }

}

</script>
<style lang="scss">
    .approval{
        width:50%;
        margin:40px auto;
        .el-form-item__label{
            line-height:16px;
        }
    }
</style>